<?php $this->headLink()->prependStylesheet(_STATIC_HTTP . '/www/css/special.css');?>
<!-- <?php echo $this->cache()->file;?> -->
<div class="box specialPhotos">
	<h1 class="o9"><?php echo $this->escape($this->special['title']);?></h1>
	<em class="specialPtotal number red"><?php echo $this->special['ptotal'];?> photo(s)</em>
	<div class="info">
		<div class="btn">
			<div class="sharebuttons"><?php echo $this->advertise('share')->render($this->client);?></div>
		</div>
		<div class="tags">
			<?php echo $this->language('标签')?>:
			<?php
				$tags = array();
				foreach($this->special['_keywords'] AS $tag) {
					$tags[] = '<a href="' . $tag['_url'] . '">' . $this->escape($tag['name']) . '</a>';
				}
				echo implode(',', $tags);
			?>
		</div>
		<ul class="np o6">
			<li class="prev"><?php 
			$previous = $this->special['_previous'];
			if(!empty($previous)) {
				echo '<a href="' . $previous['_url'] . '" title="' . $previous['ptotal'] . ' photo(s)">';
				echo '<strong>' . $this->language('前一组好图') . '</strong>';
				echo ': ' . $this->escape($previous['title']) . '(<em class="yellow number">' . $previous['ptotal'] . '</em>)</a>';
			} else {
				echo '<strong>' . $this->language('前一组好图') . '</strong>: ';
			}
			?></li>
			<li class="next"><?php 
			$next = $this->special['_next'];
			if(!empty($next)) {
				echo '<a href="' . $next['_url'] . '" title="' . $next['ptotal'] . ' photo(s)">';
				echo '<strong>' . $this->language('后一组好图') . '</strong>';
				echo ': ' . $this->escape($next['title']) . '(<em class="yellow number">' . $next['ptotal'] . '</em>)</a>';
			} else {
				echo '<strong>' . $this->language('后一组好图') . '</strong>: ';
			}
			?></li>
		</ul>
		<div class="clear"></div>
	</div>
	<div class="bd">
		<ul class="specialList o8" id="specialList">
			<?php 
			$key = 0;
			foreach($this->special['_photos'] AS $row) {
				if($key > 0 && $key % 5 == 0) {
					echo '<div class="clear"></div>';
				}
				$key++;
			?>
			<li>
				<div class="specialMinBox">
					<div class="img">
						<a href="<?php echo $row['_url'];?>">
						<img src="<?php echo $row['_image']['thumb'];?>" alt="<?php echo $this->escape($this->special['title']);?>" class="o9" onmouseover="this.className='';" onmouseout="this.className='o9';" />
						<em class="o6"><?php echo $this->escape($this->special['title']);?></em>
						</a>
					</div>
				</div>
			</li>
			<?php } ?>
		</ul>
	</div>
	<div class="clear"></div>
</div>
<div class="box">
	<div class="bd">
		<?php echo $this->advertise('banner828x90')->render($this->client);?>
	</div>
</div>
<div class="box">
	<div class="hd">
		<h3 class="category"><?php echo $this->language('相关推荐');?></h3>
		<code><a href="<?php echo $this->url('index/list', array('type' => 'recommend', 'page' => '1'));?>"><?php echo $this->language('更多')?></a></code>
	</div>
	<div class="bd">
		<?php
		$related = array();
		foreach($this->special['_related'] AS $key => $special) {
			if($key >= 5) continue;
			$related[] = $special;
		}
		echo $this->partial('include/specialList.phtml', 
				array(
					'id' => 'relatedSpecial', 
					'row' => false, 
					'list' => $related
				)
		);?>
	</div>
	<div class="clear"></div>
</div>
<div class="box">
	<div class="hd">
		<h3 class="comment"><?php echo $this->language('好图评论');?></h3>
		<!-- code><a href="#"><?php echo $this->language('订阅');?></a><a href="#"><?php echo $this->language('订阅');?></a></code -->
	</div>
	<div class="bd">
		<?php echo $this->render('include/comment.phtml');?>
		<div class="clear"></div>
	</div>
</div>
